Imports CapaDeDatos
Public Class nImpRecCaja
  Private  ImpRecCaja as dImpRecCaja= New dImpRecCaja()
  Public Function Insertar(ByVal Importe as String,ByVal IdRecibo as String) as BOOLEAN
     if Importe <> "" and IdRecibo <> "" then 
       Return ImpRecCaja.Insertar(Importe ,IdRecibo ) 
     End If
     Return FALSE
  End Function
  Public Function Eliminar(ByVal IdImpRecCaja as String) as BOOLEAN
     Return ImpRecCaja.Eliminar(IdImpRecCaja )
  End Function
    Public Function EliminarRecibo(ByVal IdRecibo As String) As Boolean
        Dim exito = True
        Dim dtsImputaciones As DataSet = ImpRecCaja.BuscarFiltrado("", "", IdRecibo)
        For Each row As DataRow In dtsImputaciones.Tables(0).Rows
            exito = exito And ImpRecCaja.Eliminar(row("IdImpRecCaja").ToString)
        Next
        Return exito
    End Function
    Public Function BuscarFiltrado(ByVal IdImpRecCaja As String, ByVal Importe As String, ByVal IdRecibo As String) As DataSet
        Return ImpRecCaja.BuscarFiltrado(IdImpRecCaja, Importe, IdRecibo)
    End Function
End Class
